package com.ruoyi.web.controller.tool;

import com.ruoyi.web.core.tool.CodeUtils;

/**
 * 业务编号工具类
 *
 * @author Jyl
 */
public class JoCodeUtils
{

    final public static String PRODUCTCODE = "PC";
    final public static String COMMODITYCODE = "SP";
    final public static String ORDERCODE = "DD";
    final public static String REFUNDCODE = "RE";
    final public static String PAYMENTRECEIVEDCODE = "PR";
    /**
     * 产品前缀
     */
    public String PRODUCT = CODE_(PRODUCTCODE);
    /**
     * 商品前缀
     */
    public String COMMODITY = CODE_(COMMODITYCODE);
    /**
     * 订单前缀
     */
    public String ORDER = CODE_(ORDERCODE);
    /**
     * 退货
     */
    public String REFUND = CODE_(REFUNDCODE);
    /**
     * 回款
     */
    public String PAYMENTRECEIVED = CODE_(PAYMENTRECEIVEDCODE);

    public static JoCodeUtils CODE()
    {
        return new JoCodeUtils();
    }

    /**
     * 生成编码
     */
    public String CODE_(String type)
    {
        return new CodeUtils().generate(type);
    }

}
